//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

package javax.vpncrypto.spec;

import java.security.spec.AlgorithmParameterSpec;

public class GCMParameterSpec implements AlgorithmParameterSpec {
    private byte[] iv;
    private int tLen;

    public GCMParameterSpec(int var1, byte[] var2) {
        if (var2 == null) {
            throw new IllegalArgumentException("src array is null");
        } else {
            this.init(var1, var2, 0, var2.length);
        }
    }

    public GCMParameterSpec(int var1, byte[] var2, int var3, int var4) {
        this.init(var1, var2, var3, var4);
    }

    private void init(int var1, byte[] var2, int var3, int var4) {
        if (var1 < 0) {
            throw new IllegalArgumentException("Length argument is negative");
        } else {
            this.tLen = var1;
            if (var2 != null && var4 >= 0 && var3 >= 0 && var4 <= var2.length - var3) {
                this.iv = new byte[var4];
                System.arraycopy(var2, var3, this.iv, 0, var4);
            } else {
                throw new IllegalArgumentException("Invalid buffer arguments");
            }
        }
    }

    public int getTLen() {
        return this.tLen;
    }

    public byte[] getIV() {
        return (byte[])this.iv.clone();
    }
}
